<%-- 
    Document   : addRoom
    Created on : May 1, 2011, 3:12:45 PM
    Author     : Kevin
--%>

<%@page contentType="text/html" import="com.movie.Room" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="headero.html"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Add Room</title>
        <script type="text/javascript">
            function validate(){
                with(document.form5){
                    if(seats.value.length < 1){
                        alert("please input seats number");
                        seats.focus();
                        return false;                        
                    }if(isNaN(seats.value)){
                        alert("please input number only");
                        seats.focus();
                        return false;                        
                    }
                    
                }
                return true;
            }
                
        
            
        </script>
    </head>
    <body>

        <form name="form5" onsubmit="return validate();" action="AddRoom">
            <table>
                <tr>
                    <td>Number of seats in this room</td>
                    <td>            <input type="text" name="seats"  size="20">
                    </td>
                </tr>         
                <tr>
                    <td><input type="submit" value="Add"></td><td></td>
            </table>
        </form>         
        <% if (session.getAttribute("roomList") != null) {%>
        <form action="AddCinemaInfo" method="get">
            <input type="submit" value="enough" >
        </form>
        <%}%>



    </body>
</html>
 <%@include file="footer.html"%>